home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / _WordAttach.au3 < prev    next >
Text File  |  2007-09-08  |  750b  |  19 lines

  1. ; *******************************************************
  2. ; Example 1 - Attach to a word window with an open file named "Test.doc",
  3. ;                then display the documents full file path.
  4. ; *******************************************************
  5. ;
  6. #include <Word.au3>
  7. $oWordApp = _WordAttach ("Test.doc", "FileName")
  8. If Not @error Then
  9.     $oDoc = _WordDocGetCollection ($oWordApp, 0)
  10.     MsgBox(64, "Document FileName", $oDoc.FullName)
  11. EndIf
  12.  
  13. ; *******************************************************
  14. ; Example 2 - Attach to a word window with "The quick brown fox"
  15. ;               in the text of the document
  16. ; *******************************************************
  17. ;
  18. #include <Word.au3>
  19. $oWordApp = _WordAttach ("The quick brown fox", "Text")